Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SDK] Add UTs for wait_for_job_conditions #2196

Merged

Conversation

Electronic-Waste
Copy link
Member

What this PR does / why we need it:

I add some UTs for function wait_for_job_conditions in the Python SDK

Which issue(s) this PR fixes (optional, in Fixes #<issue number>, #<issue number>, ... format, will close the issue(s) when PR gets merged):
Ref #2161

Checklist:

  • Docs included if any changes are user facing

@Electronic-Waste Electronic-Waste force-pushed the test/wait-for-job-conditions branch from 2743bab to f889b9f Compare August 6, 2024 15:37
@coveralls
Copy link

coveralls commented Aug 6, 2024

Pull Request Test Coverage Report for Build 10632610394

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.06%) to 31.809%

Totals Coverage Status
Change from base Build 10600609425: 0.06%
Covered Lines: 3951
Relevant Lines: 12421

💛 - Coveralls

Copy link
Member

@andreyvelich andreyvelich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the late reply @Electronic-Waste!
Please can you rebase your PR so we can review it ?

Signed-off-by: Electronic-Waste <2690692950@qq.com>
Signed-off-by: Electronic-Waste <2690692950@qq.com>
Signed-off-by: Electronic-Waste <2690692950@qq.com>
Signed-off-by: Electronic-Waste <2690692950@qq.com>
@Electronic-Waste Electronic-Waste force-pushed the test/wait-for-job-conditions branch from f889b9f to 53c8e83 Compare August 29, 2024 14:21
@Electronic-Waste
Copy link
Member Author

@andreyvelich Sure! I've rebased the branch to master.

Signed-off-by: Electronic-Waste <2690692950@qq.com>
Copy link
Member

@andreyvelich andreyvelich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this @Electronic-Waste!
/assign @droctothorpe @YosiElias @kubeflow/wg-training-leads

@@ -359,6 +420,15 @@ def training_client():
yield client


@pytest.fixture
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you need separate fixture just for wait_for_job_condition or we can re-use Training client like for other tests ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I separate fixture for wait_for_job_condition because it needs to mock function get_job. I'm not sure whether it will affect other UTs but I can have a try:)

test_data_wait_for_job_conditions = [
(
"timeout waiting for succeeded condition",
{"name": TEST_NAME, "namespace": "timeout", "wait_timeout": 0},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, I'll replace that.

Signed-off-by: Electronic-Waste <2690692950@qq.com>
@andreyvelich
Copy link
Member

Thanks for the update @Electronic-Waste!
/lgtm
/approve

Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: andreyvelich

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@google-oss-prow google-oss-prow bot merged commit e64af3d into kubeflow:master Aug 30, 2024
39 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants